import { RoutesService, eLayoutType } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared';

export const APP_ROUTE_PROVIDER = [
  { provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
];

function configureRoutes(routesService: RoutesService) {
  return () => {
    routesService.add([
      {
        path: '/',
        name: '::Menu:Home',
        iconClass: 'safety',
        order: 0,
        parentName: eThemeSharedRouteNames.Administration,
        layout: eLayoutType.application,
      },
      {
        path: '/test/menu3',
        name: '主菜单1',
        iconClass: 'safety',
        order: 1,
        parentName: eThemeSharedRouteNames.Administration,
        layout: eLayoutType.application,
      },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单2',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单3',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单4',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单5',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单6',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单7',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单8',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单9',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单10',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单11',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单12',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单13',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单14',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单15',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单16',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单17',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
      // {
      //   path: '/test/menu3',
      //   name: '主菜单18',
      //   iconClass: 'safety',
      //   order: 1,
      //   parentName: eThemeSharedRouteNames.Administration,
      //   layout: eLayoutType.application,
      // },
    ]);
  };
}
